package com.holly.unit.deform.api.exception;

import cn.hutool.core.util.StrUtil;
import com.holly.unit.core.exception.AbstractExceptionEnum;
import com.holly.unit.core.exception.base.ServiceException;
import com.holly.unit.deform.api.constants.DeformConstants;

/**
 * 类描述: 表单设计器异常类
 *
 * @author fxr
 * @version 1.0.0
 * @date 2022/4/1 19:00
 */
public class DeformException extends ServiceException {

    public DeformException(AbstractExceptionEnum exception, Object... params) {
        super(DeformConstants.DEFORM_MODULE_NAME, exception.getErrorCode(), StrUtil.format(exception.getUserTip(), params));
    }

    public DeformException(AbstractExceptionEnum exception) {
        super(DeformConstants.DEFORM_MODULE_NAME, exception);
    }

}
